package com.example.book.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.book.common.Result;
import com.example.book.entry.Cart;
import com.example.book.mapper.CartMapper;
import com.example.book.service.ICartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CartServiceImpl extends ServiceImpl<CartMapper, Cart> implements ICartService {

    @Autowired
    private CartMapper cartMapper;

    @Override
    public List<Cart> getUserCart(Integer id) {
        List<Cart> userCart = cartMapper.getUserCart(id);
        return userCart;
    }
}
